﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Transformer.iHunter
{
    /// <summary>
    /// The event args associated with an operating failure of a plugin
    /// </summary>
    public class PluginErrorEventArgs : EventArgs
    {
        private string errorMessage;

        /// <summary>
        /// Gets the error message.
        /// </summary>
        /// <value>The error message.</value>
        public string ErrorMessage
        {
            get
            {
                return errorMessage;
            }
        }
        private object target;

        /// <summary>
        /// Gets the object that associated with the error.
        /// </summary>
        /// <value>The object.</value>
        public object Target
        {
            get
            {
                return target;
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PluginErrorEventArgs"/> class.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="errorMessage">The error message.</param>
        public PluginErrorEventArgs(object target, string errorMessage)
        {
            this.target = target;
            this.errorMessage = errorMessage;
        }

    }

    /// <summary>
    /// The event handler associated with an operating failure of a plugin
    /// </summary>
    public delegate void PluginErrorEventHandler(object sender, PluginErrorEventArgs e);
}
